//
//  ReleaseController.m
//  AppNew
//
//  Created by 陈名邦 on 2019/6/19.
//  Copyright © 2019 华伟. All rights reserved.
//

#import "ReleaseController.h"

@interface ReleaseController ()

@end

@implementation ReleaseController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"发布出售订单";
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/
- (IBAction)releaseAction:(id)sender {
    
    NSMutableDictionary *params = [NSMutableDictionary dictionary];
    [params setObject:@"USDT" forKey:@"digitCurrency"];
    [params setObject:@"CNY" forKey:@"currency"];
    [params setObject:@"7" forKey:@"price"];
    [params setObject:@"100" forKey:@"amount"];
    [params setObject:@"80" forKey:@"quota"];
    [params setObject:@"1" forKey:@"payType"];
    [params setObject:@"123456" forKey:@"payPwd"];
    [params setObject:@"test" forKey:@"remarks"];
//    payPwd
//    remarks
    NSString *url = [NSString stringWithFormat:@"http://119.160.234.147:8080/trade/pubSellOrder"];
    [NetRequestTool post:url
                  params:@{}
                 success:^(id  _Nonnull json) {

                     BOOL flag = [[json objectForKey:@"flag"] boolValue];
                     if (flag) {

                     }else{

                         [SVProgressHUD showErrorWithStatus:[json objectForKey:@"msg"]];

                     }

                 } failure:^(NSError * _Nonnull error) {

                 }];
    
    
//发布卖单
//    NSString *url = [NSString stringWithFormat:@"http://119.160.234.147:8080/bbTrade/pubSellInfo?bz=RPIC&price=3&amount=10"];
//    [NetRequestTool post:url
//                  params:@{}
//                 success:^(id  _Nonnull json) {
//
//                     BOOL flag = [[json objectForKey:@"flag"] boolValue];
//                     if (flag) {
//
//                     }else{
//
//                         [SVProgressHUD showErrorWithStatus:[json objectForKey:@"msg"]];
//
//                     }
//
//                 } failure:^(NSError * _Nonnull error) {
//
//                 }];
    
    
}

@end
